package com.hao.hospital.controller;

import com.hao.hospital.Interceptor.WeiXinUserInterceptor;
import com.jfinal.aop.Before;
import com.jfinal.aop.Clear;
import com.jfinal.core.Controller;
import com.jfinal.plugin.activerecord.Record;

public class MainAction extends Controller {
	public void index() {
		render("./register/index.html");
	}
	
	@Clear
	public void updateinfo(){
		render("register/info.html");
	}
	/**
	 * 个人病历界面
	 */
	public void record(){
		render("user/medical.html");
	}
	/**
	 * 个人预约记录
	 */
	public void register(){
		render("user/register.html");
	}
	/**
	 * 在线预约
	 */
	@Before(WeiXinUserInterceptor.class)
	public void OnlineBooking() {
		setAttr("openid", getSessionAttr("openid"));
		System.out.println("seesion里面openid：" + getSessionAttr("openid"));
		render("register/liebiao.html");
	}
	
	/**
	 * 病历查询
	 */
	@Before(WeiXinUserInterceptor.class)
	public void MedicalQuiry() {
		setAttr("openid", getSessionAttr("openid"));
		render("recordquiry/liebiao.html");
	}

	/**
	 * 个人查询
	 */
	@Before(WeiXinUserInterceptor.class)
	public void PatientPayment() {
		render("user/user.html");
	}
	
	public void reservation() {
		
	}
}
